
FUNCTION dttoa

	IF(pString <> 0)THEN
		internal := DT_TO_STRING(value);
		brsstrcpy(pString, ADR(internal));
		dttoa := UDINT_TO_UINT(brsstrlen(ADR(internal)));
	ELSE
		dttoa := 0;
	END_IF
	 
END_FUNCTION

FUNCTION ttoa

	IF(pString <> 0)THEN
		internal := TIME_TO_STRING(value);
		brsstrcpy(pString, ADR(internal));
		ttoa := UDINT_TO_UINT(brsstrlen(ADR(internal)));
	ELSE
		ttoa := 0;
	END_IF
	 
END_FUNCTION

FUNCTION dtoa

	IF(pString <> 0)THEN
		internal := DATE_TO_STRING(value);
		brsstrcpy(pString, ADR(internal));
		dtoa := UDINT_TO_UINT(brsstrlen(ADR(internal)));
	ELSE
		dtoa := 0;
	END_IF
	 
END_FUNCTION

FUNCTION todtoa

	IF(pString <> 0)THEN
		internal := TOD_TO_STRING(value);
		brsstrcpy(pString, ADR(internal));
		todtoa := UDINT_TO_UINT(brsstrlen(ADR(internal)));
	ELSE
		todtoa := 0;
	END_IF
	 
END_FUNCTION

